package com.ruoyi.recipes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.recipes.mapper.RecipeStepsMapper;
import com.ruoyi.recipes.domain.RecipeSteps;
import com.ruoyi.recipes.service.IRecipeStepsService;

import javax.annotation.Resource;

/**
 * 制作步骤Service业务层处理
 * 
 * @author syy
 * @date 2025-08-14
 */
@Service
public class RecipeStepsServiceImpl implements IRecipeStepsService 
{
    @Resource
    private RecipeStepsMapper recipeStepsMapper;

    /**
     * 查询制作步骤
     * 
     * @param id 制作步骤主键
     * @return 制作步骤
     */
    @Override
    public RecipeSteps selectRecipeStepsById(Long id)
    {
        return recipeStepsMapper.selectRecipeStepsById(id);
    }

    /**
     * 查询制作步骤列表
     * 
     * @param recipeSteps 制作步骤
     * @return 制作步骤
     */
    @Override
    public List<RecipeSteps> selectRecipeStepsList(RecipeSteps recipeSteps)
    {
        return recipeStepsMapper.selectRecipeStepsList(recipeSteps);
    }

    /**
     * 新增制作步骤
     * 
     * @param recipeSteps 制作步骤
     * @return 结果
     */
    @Override
    public int insertRecipeSteps(RecipeSteps recipeSteps)
    {
        return recipeStepsMapper.insertRecipeSteps(recipeSteps);
    }

    /**
     * 修改制作步骤
     * 
     * @param recipeSteps 制作步骤
     * @return 结果
     */
    @Override
    public int updateRecipeSteps(RecipeSteps recipeSteps)
    {
        return recipeStepsMapper.updateRecipeSteps(recipeSteps);
    }

    /**
     * 批量删除制作步骤
     * 
     * @param ids 需要删除的制作步骤主键
     * @return 结果
     */
    @Override
    public int deleteRecipeStepsByIds(Long[] ids)
    {
        return recipeStepsMapper.deleteRecipeStepsByIds(ids);
    }

    /**
     * 删除制作步骤信息
     * 
     * @param id 制作步骤主键
     * @return 结果
     */
    @Override
    public int deleteRecipeStepsById(Long id)
    {
        return recipeStepsMapper.deleteRecipeStepsById(id);
    }
}
